#include <stdio.h>

/* Basic struck format:

  struct <structure name>
  {
      <variable dec>;
      <variable dec>;
      <variable dec>;

   }




*/

int main()
{
  printf ("Y Struck 1\n");


  
  struct student    //This is a justa template. This basically your predefine type. 
  {
    int id;
    char name[21];
    int age;
  };
    
  struct student st1; //This is where it is declared

  st1.id  = 99;         // Way to access element
  // st1.name ="Test Name"; // When copy string to another string use strcopy
  strcpy (st1.name,"Test Name"); // Proper way of doing it, 
  st1.age = 20;
  

  printf ("ID: %d\n",st1.id);
  printf ("Name: %s \n",st1.name);
  printf ("Age: %d\n",st1.age);


  /* User array to extend the struct functionaility */

  struct student studentmembers[10]; /* Another is declared */

  studentmembers[0].id  = 100;
  strcpy (studentmembers[0].name,"Extended Name");
  studentmembers[0].age= 30;

  
  printf ("EXT ID: %d\n",studentmembers[0].id);
  printf ("EXT Name: %s\n",studentmembers[0].name);
  printf ("EXT Age: %d\n",studentmembers[0].age);
    
  
  
  return 0;
}

